﻿using IOA.MES.DataAccess.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IOA.MES.PdaApi.Models.Response.Load
{
    public class QueryLoadsResponse
    {
        /// <summary>
        /// 装车记录
        /// </summary>
        public List<Load> Loads { get; set; } = new List<Load>();
    }

    public class Load
    {
        /// <summary>
        /// 装车ID
        /// </summary>
        public int LoadId { get; set; }

        /// <summary>
        /// 柜号
        /// </summary>
        public string CabinetNo { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string LoadTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public string FinishTime { get; set; }

        /// <summary>
        /// 已装车数量
        /// </summary>
        public int LoadedQuantity { get; set; }

        /// <summary>
        /// 总数
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 装车人
        /// </summary>
        public string LoadBy { get; set; }

        /// <summary>
        /// 司机
        /// </summary>
        public string Driver { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 车牌号
        /// </summary>
        public string NumberPlate { get; set; }

        /// <summary>
        /// 锁号
        /// </summary>
        public string LockNo { get; set; }

        /// <summary>
        /// 真实柜号
        /// </summary>
        public string ActualCabinetNo { get; set; }

        /// <summary>
        /// 装车状态
        /// </summary>
        public LoadStatus LoadStatus { get; set; }

        /// <summary>
        /// 装车状态
        /// </summary>
        public string CNLoadStatus { get { return !Enum.IsDefined(typeof(LoadStatus), LoadStatus) ? string.Empty : EnumConvert.ToDesc(LoadStatus); } }

        /// <summary>
        /// 包装列表
        /// </summary>
        public List<Pack> Packs { get; set; } = new List<Pack>();
    }

    public class Pack
    {
        /// <summary>
        /// 包装编号
        /// </summary>
        public string PackNo { get; set; }

        /// <summary>
        /// 包装批次号
        /// </summary>
        public string PackBatchNo { get; set; }

        /// <summary>
        /// 是否已装车
        /// </summary>
        public bool Loaded { get; set; }
    }
}
